package com.victualler.product.depot.controller.impl;

import com.victualler.core.base.controller.impl.BaseRestControllerImpl;
import com.victualler.core.common.dto.PageDto;
import com.victualler.product.depot.controller.DepotController;
import com.victualler.product.depot.dto.DepotRequestDto;
import com.victualler.product.depot.entity.DepotDao;
import com.victualler.product.depot.repository.DepotQueryRepository;
import com.victualler.product.depot.repository.DepotRepository;
import com.victualler.product.depot.service.DepotService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Guoshichang
 * @discription:  仓库实体
 */
@RestController
@RequestMapping("/product/depot")
public class DepotControllerImpl extends BaseRestControllerImpl<DepotDao,DepotRepository,DepotQueryRepository,DepotService> implements DepotController {
    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param depotRequestDto 请求对象
     * @Function  根据条件入参depotRequestDto动态分页查询权限
     */
    @RequestMapping("/getByRequestDto")
    public PageDto<DepotDao> getByRequestDto(@RequestBody DepotRequestDto depotRequestDto, @RequestParam("pageNo") int pageNo, @RequestParam("limit") int limit) {
        return this.baseService.getByRequestDto(depotRequestDto,pageNo,limit);
    }

}
